package cn.mifengkong.appcommon.webview.uicomponent;

/**
 * Created by jiangyongxing on 2018/4/13.
 * 描述：
 */

public class WebviewDataConfig {

    private String mUserId;
    private String mUserIdForJJ;
    private String mToken;
    private String mTokenForJJ;
    private String mPhone;
    private String mPhoneForJJ;

    private String mAppVersion;//APP的版本
    private String mPlatType;//平台版本  Android还是IOS
    private String mAppUnionName;//APP的唯一标示名称
    private String mCityId;//速贷中的cityId
    private String mPackageName;
    private String mAppName;
    private String mDevBrand;//手机类型  比如说 华为  魅族 小米
    private String mUUID;//设备唯一凭证
    private String mCountryCode;//国家代码
    private String model;//手机型号  比如说  华为的P10  P20指的是P20 P10  不包括华为
    private String mNetInfo;//网络类型
    private String mPlatVersion;//与 mAppVersion 一致
    private String mSourceId;//渠道号
    private String mScreentSzie;//分辨率
    private String mMobleOperators;//运营商
    private String mLanguageCode;//语言编号
    private String mEquipmentCapacity;//手机存储内存
    private String mAndroidVersion;
    private String mLatitude;
    private String mLongitude;

    public WebviewDataConfig(String userId, String userIdForJJ, String token, String tokenForJJ, String phone, String phoneForJJ, String appVersion, String platType, String appUnionName, String cityId, String packageName, String appName, String devBrand, String UUID, String countryCode, String model, String netInfo, String platVersion, String sourceId, String screentSzie, String mobleOperators, String languageCode, String equipmentCapacity,String androidVersion, String latitude, String longitude) {
        mUserId = userId;
        mUserIdForJJ = userIdForJJ;
        mToken = token;
        mTokenForJJ = tokenForJJ;
        mPhone = phone;
        mPhoneForJJ = phoneForJJ;
        mAppVersion = appVersion;
        mPlatType = platType;
        mAppUnionName = appUnionName;
        mCityId = cityId;
        mPackageName = packageName;
        mAppName = appName;
        mDevBrand = devBrand;
        mUUID = UUID;
        mCountryCode = countryCode;
        this.model = model;
        mNetInfo = netInfo;
        mPlatVersion = platVersion;
        mSourceId = sourceId;
        mScreentSzie = screentSzie;
        mMobleOperators = mobleOperators;
        mLanguageCode = languageCode;
        mEquipmentCapacity = equipmentCapacity;
        mAndroidVersion = androidVersion;
        mLatitude = latitude;
        mLongitude = longitude;
    }

    public void updateData(String userId, String userIdForJJ, String token, String tokenForJJ, String phone, String phoneForJJ) {
        mUserId = userId;
        mUserIdForJJ = userIdForJJ;
        mToken = token;
        mTokenForJJ = tokenForJJ;
        mPhone = phone;
        mPhoneForJJ = phoneForJJ;
    }

    public void updateData(String userId, String token, String phone) {
        mUserId = userId;
        mToken = token;
        mPhone = phone;
    }

    public void updateLocation(String latitude, String longitude) {
        mLatitude = latitude;
        mLongitude = longitude;
    }

    public String getAndroidVersion() {
        return mAndroidVersion;
    }

    public String getUserId() {
        return mUserId;
    }

    public String getUserIdForJJ() {
        return mUserIdForJJ;
    }

    public String getToken() {
        return mToken;
    }

    public String getTokenForJJ() {
        return mTokenForJJ;
    }

    public String getPhone() {
        return mPhone;
    }

    public String getPhoneForJJ() {
        return mPhoneForJJ;
    }

    public String getAppVersion() {
        return mAppVersion;
    }

    public String getPlatType() {
        return mPlatType;
    }

    public String getAppUnionName() {
        return mAppUnionName;
    }

    public String getCityId() {
        return mCityId;
    }

    public String getPackageName() {
        return mPackageName;
    }

    public String getAppName() {
        return mAppName;
    }

    public String getDevBrand() {
        return mDevBrand;
    }

    public String getUUID() {
        return mUUID;
    }

    public String getCountryCode() {
        return mCountryCode;
    }

    public String getModel() {
        return model;
    }

    public String getNetInfo() {
        return mNetInfo;
    }

    public String getPlatVersion() {
        return mPlatVersion;
    }

    public String getSourceId() {
        return mSourceId;
    }

    public String getScreentSzie() {
        return mScreentSzie;
    }

    public String getMobleOperators() {
        return mMobleOperators;
    }

    public String getLanguageCode() {
        return mLanguageCode;
    }

    public String getEquipmentCapacity() {
        return mEquipmentCapacity;
    }

    public String getLatitude() {
        return mLatitude;
    }

    public String getLongitude() {
        return mLongitude;
    }

    public static class Builder {
        private String mUserId;
        private String mUserIdForJJ;
        private String mToken;
        private String mTokenForJJ;
        private String mPhone;
        private String mPhoneForJJ;

        private String mUUID;//设备唯一凭证
        private String mAppName;
        private String mPackageName;
        private String mAppVersion;//APP的版本
        private String mSourceId;//渠道号
        private String mPlatType;//平台版本  Android还是IOS
        private String mAppUnionName;//APP的唯一标示名称
        private String mCityId;//速贷中的cityId
        private String mPlatVersion;//Android版本  比如23
        private String mDevBrand;//手机类型  比如说 华为  魅族 小米
        private String model;//手机型号  比如说  华为的P10  P20指的是P20 P10  不包括华为
        private String mNetInfo;//网络类型
        private String mMobleOperators;//运营商
        private String mScreentSzie;//分辨率
        private String mCountryCode;//国家代码
        private String mLanguageCode;//语言编号
        private String mEquipmentCapacity;//手机存储内存
        private String mLatitude;
        private String mLongitude;
        private String mAndroidVersion;

        /**
         * 设置速贷的userId
         *
         * @param userId
         * @return
         */
        public Builder setUserId(String userId) {
            this.mUserId = userId;
            return this;
        }

        /**
         * 设置懒人信用卡的UserId
         *
         * @param userIdForJJ
         * @return
         */
        public Builder setUserIdForJJ(String userIdForJJ) {
            this.mUserIdForJJ = userIdForJJ;
            return this;
        }

        /**
         * 设置速贷的token
         *
         * @param token
         * @return
         */
        public Builder setToken(String token) {
            this.mToken = token;
            return this;
        }

        /**
         * 设置速懒人信用卡的token
         *
         * @param tokenForJJ
         * @return
         */
        public Builder setTokenForJJ(String tokenForJJ) {
            this.mTokenForJJ = tokenForJJ;
            return this;
        }

        /**
         * 设置手机号
         *
         * @param phone
         * @return
         */
        public Builder setPhone(String phone) {
            this.mPhone = phone;
            return this;
        }

        /**
         * 设置懒人信用卡的手机号
         *
         * @param phoneForJJ
         * @return
         */
        public Builder setPhoneForJJ(String phoneForJJ) {
            mPhoneForJJ = phoneForJJ;
            return this;
        }

        /**
         * 设置APP的版本
         *
         * @param appVersion
         * @return
         */
        public Builder setAppVersion(String appVersion) {
            mAppVersion = appVersion;
            mPlatVersion = appVersion;
            return this;
        }

        public Builder setPlatVersion(String platVersion) {
            mAppVersion = platVersion;
            mPlatVersion = platVersion;
            return this;
        }

        /**
         * 设置手机类型
         *
         * @param platType
         * @return
         */
        public Builder setPlatType(String platType) {
            mPlatType = platType;
            return this;
        }

        /**
         * 设置app的唯一标识名
         *
         * @param appUnionName
         * @return
         */
        public Builder setAppUnionName(String appUnionName) {
            mAppUnionName = appUnionName;
            return this;
        }

        /**
         * 设置当前城市的cityId
         *
         * @param cityId
         * @return
         */
        public Builder setCityId(String cityId) {
            mCityId = cityId;
            return this;
        }

        /**
         * 设置包名
         *
         * @param packageName
         * @return
         */
        public Builder setPackageName(String packageName) {
            mPackageName = packageName;
            return this;
        }

        /**
         * 设置app的名称
         *
         * @param appName
         * @return
         */
        public Builder setAppName(String appName) {
            mAppName = appName;
            return this;
        }

        /**
         * 设备型号
         *
         * @param devBrand
         * @return
         */
        public Builder setDevBrand(String devBrand) {
            mDevBrand = devBrand;
            return this;
        }

        /**
         * 设备唯一识别号
         *
         * @param UUID
         * @return
         */
        public Builder setUUID(String UUID) {
            mUUID = UUID;
            return this;
        }

        public Builder setCountryCode(String countryCode) {
            mCountryCode = countryCode;
            return this;
        }

        public Builder setModel(String model) {
            this.model = model;
            return this;
        }

        public Builder setNetInfo(String netInfo) {
            mNetInfo = netInfo;
            return this;
        }

        public Builder setSourceId(String sourceId) {
            mSourceId = sourceId;
            return this;
        }

        public Builder setScreentSzie(String screentSzie) {
            mScreentSzie = screentSzie;
            return this;
        }

        public Builder setMobleOperators(String mobleOperators) {
            mMobleOperators = mobleOperators;
            return this;
        }

        public Builder setLanguageCode(String languageCode) {
            mLanguageCode = languageCode;
            return this;
        }

        public Builder setEquipmentCapacity(String equipmentCapacity) {
            mEquipmentCapacity = equipmentCapacity;
            return this;
        }

        public Builder setLatitude(String latitude) {
            mLatitude = latitude;
            return this;
        }

        public Builder setLongitude(String longitude) {
            mLongitude = longitude;
            return this;
        }

        public Builder setAndroidVersion(String androidVersion) {
            mAndroidVersion = androidVersion;
            return this;
        }

        public WebviewDataConfig create() {
            WebviewDataConfig webviewDataConfig = new WebviewDataConfig(mUserId, mUserIdForJJ, mToken, mTokenForJJ, mPhone, mPhoneForJJ,
                    mAppVersion, mPlatType, mAppUnionName, mCityId, mPackageName, mAppName, mDevBrand, mUUID, mCountryCode, model,
                    mNetInfo, mPlatVersion, mSourceId, mScreentSzie, mMobleOperators, mLanguageCode, mEquipmentCapacity, mAndroidVersion,mLatitude, mLongitude);
            return webviewDataConfig;
        }


    }
}
